package functions

import "github.com/spf13/cast"

func EQ_string_int(str string, num int) bool {
	if !isInt(str) {
		throwException("Equal error: string cannot be converted to integer type, near ")
	}
	return cast.ToInt(str) == num
}

func EQ_string_float(str string, num float64) bool {
	if !isInt(str) {
		throwException("Equal error: string cannot be converted to float type, near ")
	}
	return cast.ToFloat64(str) == num
}
